//
//  KAMonthTableViewCell.m
//  KeepAccounts
//
//  Created by honeyrr on 2017/10/25.
//  Copyright © 2017年 honeyrr. All rights reserved.
//

#import "KAMonthTableViewCell.h"
@interface KAMonthTableViewCell()
@property (weak, nonatomic) IBOutlet UILabel *month;
@property (weak, nonatomic) IBOutlet UILabel *percent;
@property (weak, nonatomic) IBOutlet UILabel *allMoney;
@property (weak, nonatomic) IBOutlet UIView *bgView;

@end
@implementation KAMonthTableViewCell

-(void)setMonthDict:(NSDictionary *)monthDict
{
    _monthDict = monthDict;
    NSLog(@"%@",[monthDict[@"date"] substringFromIndex:5]);
    self.month.text = [monthDict[@"date"] substringFromIndex:5];
    self.percent.text = monthDict[@"percent"];
    self.allMoney.text = monthDict[@"money"];
    self.bgView.backgroundColor = monthDict[@"color"];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.bgView.layer.cornerRadius = 20;
    self.bgView.layer.masksToBounds = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
